<template>
	<div id="app" :class="$store.state.token===''?'login':'.login-after'">
    <router-view/>
	</div>
</template>

<style lang="less">
	.login{
		position: absolute;
		background: url("./assets/bimage4.jpeg") no-repeat;
		background-size:100% 100%;
		height: 100%;
		width: 100%;
		margin: 0;
	}
	.login-after{
		background-color: #FFFFFF;
	}
	body{
		margin: 0;
	}
</style>

<script>

  export default {
    data() {
      return {
      
      };
    },
    mounted(){
      this.isLogin()
    },
    methods: {
      isLogin(){
        if (this.$isEmpty(this.$store.state.token)){
          this.$Msg.Message.info("请登录")
          this.$router.push('/login')
        }else {
          this.$router.push('/menu')
        }
      }
    }
  }
</script>
